#include <iostream>
#include <fstream>
using std::cout;
using std::endl;
using std::string;
using std::ifstream;
using std::cerr;

void test0(){
    ifstream ifs;
    ifs.open("test.cc");

    //ifstream ifs2("test.cc");

    //string filename = "test.cc";
    //ifstream ifs3(filename);
    
    if(!ifs.good()){
        cerr << "error open " << endl;
        return;
    }
    string word;
    while(ifs >> word){
        cout << word << endl;
    }

    ifs.close();
}

int main(int argc, char * argv[])
{
    test0();
    return 0;
}


